home *** CD-ROM | disk | FTP | other *** search
/ Amiga News 95 / Amiga News 95.iso / dpat / dpat55 / codeamorce / install / installcodeamorce < prev    next >
Encoding:
Text File  |  1994-01-30  |  6.5 KB  |  232 lines

  1. ;; $VER: JYPInstall 1.3 (22-Jan-94)
  2. ;; $Id: Install,v 1.3 94/01/22 17:18:51 jyp Exp $
  3. (set nom-prog @app-name)
  4.  
  5. ;; *
  6. ;; * Ce script installe n'importe quel binaire dont la livraison est
  7. ;; * de la forme suivante (## est le nom du programme à installer)
  8. ;; *
  9. ;;    <racine>----------<##>
  10. ;;            |-<##.info>
  11. ;;            |----Docs
  12. ;;            |    |----<##.Français>
  13. ;;            |    |----<##.Deutsch>
  14. ;;            |    |----<##.Português>
  15. ;;            |    \----<##.English>
  16. ;;            |----Catalogs
  17. ;;                |----<Français>---<##.catalog>
  18. ;;                |----<Deutsch>----<##.catalog>
  19. ;;                |----<Português>--<##.catalog>
  20. ;;                \----<English>----<##.catalog>
  21.  
  22. ;; *
  23. ;; * définition des msg utiliser (tous commencent par 'M')
  24. ;; *
  25.  
  26. ;; *----------------------------------------- Français
  27. (if (= @language "français")
  28.     (
  29.      (set langue-defaut 0)
  30.      (set Msale-kick
  31.       "Vous devez posséder la version 2.04 ou supérieure du Kickstart.")
  32.      (set Mpas-2.1
  33.       "Vous devez possedez la version 2.1 ou supérieure du Workbench.")
  34.  
  35.      (set Mchoix-langue
  36.       (cat "Choisissez les langues à installer.\n"
  37.            "NOTEZ que le français est inclus dans le binaire de"
  38.            " " nom-prog "."
  39.            ))
  40.      (set Maide-choix-langue
  41.       (cat nom-prog " peut tourner dans différentes langues,"
  42.            " choississez celle(s) que vous voulez pour la"
  43.            " documentation et le programme lui-même."))
  44.  
  45.      (set Mdestination
  46.       (cat "Indiquez le répertoire dans lequel"
  47.            " " nom-prog " va être installé."))
  48.      (set Maide-destination
  49.       (cat "Ce programme va installer " nom-prog ", spécifiez"
  50.            " l'endroit où le  binaire " nom-prog ", son icône et"
  51.            " sa documentation doivent être copiés."))
  52.      )
  53.   )
  54. ;; *----------------------------------------- Deutsch
  55. (if (= @language "deutsch")
  56.     (
  57.      (set langue-defaut 1)
  58.      (set Msale-kick
  59.       (cat nom-prog " benötigt mindestens Kickstart 2.04"))
  60.      (set Mpas-2.1
  61.       (cat nom-prog " benötigt mindestens Workbench 2.1"))
  62.  
  63.      (set Mchoix-langue
  64.       (cat "Bitte geben Sie an, welche Sprachen installiert werden"
  65.            " sollen.\n"
  66.            "Bemerken Sie, daß die französiche Sprache schon in"
  67.            " " nom-prog " Program ist."
  68.            ))
  69.      (set Maide-choix-langue
  70.       (cat nom-prog " kann mit mehrere Sprachen laufen,"
  71.            " geben Sie in welchen Sprachen, die Sie für Anleitung und"
  72.            "den Program selbst wollen."))
  73.  
  74.      (set Mdestination
  75.       (cat "Bitte geben Sie an, in welchem Verzeichnis"
  76.         " " nom-prog " installiert werden soll."))
  77.      (set Maide-destination
  78.       (cat "Dises Program wird " nom-prog " installieren, geben Sie"
  79.            " in welchem Verzeichnis " nom-prog ", sein Ikon und"
  80.            " Anleitung installiert werden soll."))
  81.      )
  82.   )
  83. ;; *----------------------------------------- Português
  84. (if (= @language "português")
  85.     (
  86.      (set langue-defaut 3)
  87.      (abort "On n'attend la traduction de Ricardo.")
  88.      (set Msale-kick
  89.       "Vous devez posséder la version 2.04 ou supérieure du Kickstart.")
  90.      (set Mpas-2.1
  91.       "Vous devez possedez la version 2.1 ou supérieure du Workbench.")
  92.  
  93.      (set Mchoix-langue
  94.       (cat "Choisissez les langues à installer.\n"
  95.            "NOTEZ que le français est inclus dans le binaire de"
  96.            " " nom-prog "."
  97.            ))
  98.      (set Maide-choix-langue
  99.       (cat nom-prog " peut tourner dans différentes langues,"
  100.            " choississez celle(s) que vous voulez pour la"
  101.            " documentation et le programme lui-même."))
  102.  
  103.      (set Mdestination
  104.       (cat "Indiquez le répertoire dans lequel"
  105.            " " nom-prog " va être installé."))
  106.      (set Maide-destination
  107.       (cat "Ce programme va installer " nom-prog ", spécifiez"
  108.            " l'endroit où le  binaire " nom-prog ", son icône et"
  109.            " sa documentation doivent être copiés."))
  110.      )
  111.   )
  112. ;; *----------------------------------------- English
  113. (if (= @language "english")
  114.     (
  115.      (set langue-defaut 3)
  116.      (set Msale-kick
  117.       "You must run a Kickstart 2.04 ou higher.")
  118.      (set Mpas-2.1
  119.       "You must own a Workbench version 2.1 ou higher.")
  120.  
  121.      (set Mchoix-langue
  122.       (cat "Choose the languages to be installed.\n"
  123.            "NOTE that the french language is included in"
  124.            " " nom-prog " binary."
  125.            ))
  126.      (set Maide-choix-langue
  127.       (cat nom-prog " can run in different languages,"
  128.            " choose which one(s) you want for documentation and"
  129.            " the program itself."))
  130.  
  131.      (set Mdestination
  132.       (cat "Indicate the directory in which"
  133.            " " nom-prog " will be installed."))
  134.      (set Maide-destination
  135.       (cat "This program will install " nom-prog ", specify"
  136.            " where to put the binary " nom-prog ", its icon and"
  137.            " its documentation."))
  138.      )
  139.   )
  140. ;; *--------------------------------------
  141. ;; * Début
  142. ;; *--------------------------------------
  143. (set niveau-deb @user-level)
  144. (complete 0)
  145. (set @default-dest "SYS:")
  146. ;; *
  147. ;; * Premièrement vérifier envirionnement corret
  148. ;; *
  149. (if (> (* 37 65536) (getversion "exec.library" (resident)))
  150.     (abort Msale-kick)
  151. )
  152. (if (= "" (getassign "Locale"))
  153.     (abort Mpas-2.1)
  154. )
  155. (welcome)
  156. ;; *
  157. ;; * Choix des langues à installer
  158. ;; *
  159. (user 2)
  160. (set lang 0)
  161. (while (= lang 0)
  162.   (set lang (askoptions (prompt Mchoix-langue)
  163.             (help Maide-choix-langue)
  164.             (choices "Français"
  165.                  "Deutsch"
  166.                  "Português"
  167.                  "English")
  168.             (default (shiftleft 1 langue-defaut))))
  169.   )
  170. ;; *
  171. ;; * choix de la destination (prg + doc)
  172. ;; *
  173. (set destination (askdir (prompt Mdestination)
  174.              (help Maide-destination)
  175.              (default @default-dest)))
  176. (user niveau-deb)
  177. ;; *
  178. ;; * Tous est paré, on commence les copies
  179. ;; *
  180. (complete 10)
  181. (set rep-livr (pathonly (pathonly @icon))) ; racine de l'arbo livraison
  182.  
  183. ;; * le binaire
  184. (copyfiles (source (tackon rep-livr nom-prog))
  185.        (dest destination)
  186.        (infos)
  187.        (optional "force" "askuser")
  188.        )
  189. (complete 50)
  190. ;; * les catalogues + docs
  191. (makedir (tackon destination "Docs")
  192.      (infos))
  193. (set n 0)
  194. (while (set nom-langue (select n "Français"
  195.                  "Deutsch"
  196.                  "Português"
  197.                  "English"
  198.                  ""))
  199.   (
  200.    (if (in lang n)            ;langue spécifiée et !français
  201.        (
  202.     (if (<> 0 n)
  203.         (
  204.          ;; *
  205.          ;; * catalogue
  206.          ;; *
  207.          (set rep-dest (tackon "Locale:Catalogs" nom-langue))
  208.          (set rep-src (tackon (tackon
  209.                    rep-livr "Catalogs")
  210.                   nom-langue))
  211.          (makedir rep-dest)
  212.          (copyfiles (source (tackon rep-src (cat nom-prog ".catalog")))
  213.             (dest rep-dest)
  214.             (optional "force" "askuser"))
  215.          )
  216.       )
  217.     ;; *
  218.     ;; * documentation
  219.     ;; *
  220.     (set rep-src (tackon rep-livr "docs"))
  221.     (copyfiles (source (tackon rep-src (cat nom-prog "." nom-langue)))
  222.            (dest (tackon destination "Docs"))
  223.            (infos)
  224.            (optional "force" "askuser"))
  225.     )
  226.      )
  227.    (set n (+ n 1))
  228.   )
  229. )
  230. (set @default-dest destination)
  231. (complete 100)
  232.